# -*- encoding: utf-8 -*-
'''
@File    :   ws.py
@Time    :   2020/07/04 20:51:09
@Author  :   Wicos 
@Version :   1.0
@Contact :   wicos@wicos.cn
'''

# here put the import lib
[{"topic":"topic_one","data":"send data"},{"topic":"topic_two","data":"send data"}]
{"topic_one":[user_ids],"topic_two":[user_ids]}
class websocket:
    def __init__(self,data:str,topic:str=None,userid:str=None):
        self.data = data
        self.topic_all = {}
        self.userid_all = []
        self.topics=[].append(topic)
        self.ids = [].append(userid)

    def dict2str(self,msg:dict):
        return str(msg).replace("'",'"')
